package com.beiding.jsonanalyzer.analyze.func;

import com.beiding.jsonanalyzer.analyze.func.openfunc.Concat;
import com.beiding.jsonanalyzer.analyze.func.openfunc.Len;
import com.beiding.jsonanalyzer.analyze.func.openfunc.Split;
import com.beiding.jsonanalyzer.analyze.func.openfunc.Sum;

/**
 * 此处应该都是带有key的
 *
 * @author 丁常磊
 * @date 2022/6/27 16:32
 */

public interface StaticFunc<W extends FuncBase> extends FuncFactory<W> {

    default OneFunc concat(Object... ks) {
        return Concat.of(ks);
    }

    default OneFunc len(Object key) {
        return Len.of(key);
    }

    default OneFunc sum(Object key) {
        return Sum.of(key);
    }

    default OneFunc sum(Object key, boolean distinct) {
        return Sum.of(key, distinct);
    }

    default CollectionFunc split(Object key, String by) {
        return Split.of(key, by);
    }

}
